package com.wjwh.heaven.common.security.constant;

/**
 * 权限相关常量定义
 *
 * @author dm
 * @date 2020/6/19
 */
public interface SecurityConstant {

    /**
     * 后台管理client_id
     */
    String ADMIN_CLIENT_ID = "admin-app";

    /**
     * 前台商城client_id
     */
    String PORTAL_CLIENT_ID = "portal-app";


    /**
     * oauth 客户端信息
     */
    String CLIENT_DETAILS_KEY = "heaven_oauth:client:details";

    /**
     * 认证信息Http请求头
     */
    String JWT_TOKEN_HEADER = "Authorization";
    /**
     * JWT令牌前缀
     */
    String JWT_TOKEN_PREFIX = "Bearer ";

    /**
     * 用户信息Http请求头
     */
    String USER_TOKEN_HEADER = "user";

    /**
     * JWT存储权限前缀
     */
    String AUTHORITY_PREFIX = "ROLE_";

    /**
     * JWT存储权限属性
     */
    String AUTHORITY_CLAIM_NAME = "authorities";

    /**
     * Redis缓存权限规则key
     */
    String RESOURCE_ROLES_MAP = "auth:resource-roles";


}
